{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "5e07c281",
   "metadata": {},
   "source": [
    "### 上周回顾\n",
    "\n",
    "> * list一般方法/函数的所有使用场景案例，方法如下：\n",
    ">>1. append()\n",
    ">>2. pop(index)\\remove(values)\n",
    ">>3.count()\n",
    ">>4.extend()\n",
    ">>5.index()\n",
    ">>6.sort()\n",
    ">>...\n",
    "> * list高级用法，如下：\n",
    ">>1.copy()   复制不等于赋值，复制等价于切片\n",
    ">>2.enu\n",
    "> * 课本练习Don't panic ==>on tap，其中：\n",
    ">>1.list的一些方法实现\n",
    ">>2.str=>list的方法list(str)\n",
    ">>3.list的切片实现\n",
    ">>4.list=>的方法\".join(list)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "18e6e048",
   "metadata": {},
   "source": [
    "### 简单练习\n",
    "> vowels2.py"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "12bc99cf",
   "metadata": {},
   "outputs": [],
   "source": [
    "vowles = ['a','e','i','o','u'] # 这是元音（list）\n",
    "word = \"Milliways\" # 这是文本（str)\n",
    "# 需求：在word中打印vowles\n",
    "# for word in vowles (word)\n",
    "# for i in vowles (i,先操作word)\n",
    "# for letter in vowles (for后面的letter可以改变吗)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "974d8c5b",
   "metadata": {},
   "outputs": [],
   "source": [
    "# append()经常用来新建列表\n",
    "found = []\n",
    "for letter in word:\n",
    "    if letter in vowles:\n",
    "        if letter not in found:\n",
    "            found.append(letter)\n",
    "found"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "c5bf6de0",
   "metadata": {},
   "outputs": [],
   "source": [
    "goods_list = [\n",
    "[\"桃园三章\",12],\n",
    "[\"蜜雪冰城\",6],\n",
    "\"大七町\",\n",
    "\"益盉堂\"\n",
    "]\n",
    "user_shopping_list = [\"beer\",\"can\",\"toufu\"]\n",
    "    if user_shopping_list in goods_list\n",
    "    print(goods_list)\n",
    "    for if \n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "c4692d84",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
